package com.jwsoft.manager.core.dao.service.impl;

import com.bifang.engine.assistant.core.enums.BoolEnum;
import com.jwsoft.manager.common.vo.eduStudentEnroll.EduStudentEnrollQueryVO;
import com.jwsoft.manager.common.vo.eduStudentEnroll.EduStudentEnrollVO;
import com.jwsoft.manager.core.dao.model.EduStudentEnrollImitate;
import com.jwsoft.manager.core.dao.mapper.EduStudentEnrollImitateMapper;
import com.jwsoft.manager.core.dao.service.EduStudentEnrollImitateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 模拟报名表服务实现类
 *
 * @author chenzh
 * @since 2024-03-11
 */
@Service
public class EduStudentEnrollImitateServiceImpl extends ServiceImpl<EduStudentEnrollImitateMapper, EduStudentEnrollImitate> implements EduStudentEnrollImitateService {

    @Override
    public String queryMaxApplyId(String applyId, String schoolId, Integer year) {
        return baseMapper.queryMaxApplyId(applyId, schoolId, year);
    }

    @Override
    public List<EduStudentEnrollVO> getYwApplyList(EduStudentEnrollQueryVO vo) {
        if ("1".equalsIgnoreCase(vo.getIsbqFlag())) {
            vo.setBbFlag(BoolEnum.TRUE.getType());
        } else if ("2".equalsIgnoreCase(vo.getIsbqFlag())) {
            vo.setSpareRegisterFlag(BoolEnum.TRUE.getType());
        }
        return baseMapper.getYwApplyList(vo);
    }
}
